Break even stop loss (% of instrument price)Simply proof of concept to place a stop loss a percentage below entry price and move it to break even if the price moves the same percentage above the entre price.
Buscar en scripts para "stop loss"
EMA and MACD with Trailing Stop Loss (by Coinrule)An exponential moving average ( EMA ) is a type of moving average (MA) that places a greater weight and significance on the most recent data points. The exponential moving average is also referred to as the exponentially weighted moving average. An exponentially weighted moving average reacts more significantly to recent price changes than a simple moving average simple moving average ( SMA ), which applies an equal weight to all observations in the period.
Moving average convergence divergence ( MACD ) is a trend-following momentum indicator that shows the relationship between two moving averages of a security’s price. The MACD is calculated by subtracting the 26-period exponential moving average ( EMA ) from the 12-period EMA.
The result of that calculation is the MACD line. A nine-day EMA of the MACD called the "signal line," is then plotted on top of the MACD line, which can function as a trigger for buy and sell signals. Traders may buy the security when the MACD crosses above its signal line and sell—or short—the security when the MACD crosses below the signal line. Moving average convergence divergence ( MACD ) indicators can be interpreted in several ways, but the more common methods are crossovers, divergences, and rapid rises/falls.
The Strategy enters and closes the trade when the following conditions are met:
LONG
The MACD histogram turns bearish
EMA7 is greater than EMA14
EXIT
Price increases 3% trailing
Price decreases 1% trailing
This strategy is back-tested from 1 January 2022 to simulate how the strategy would work in a bear market and provides good returns.
Pairs that produce very strong results include XRPUSDT on the 1-minute timeframe. This short timeframe means that this strategy opens and closes trades regularly
In order to further improve the strategy, the EMA can be changed from 7 and 14 to, say, EMA20 and EMA50. Furthermore, the trailing stop loss can also be changed to ideally suit the user to match their needs.
The strategy assumes each order is using 30% of the available coins to make the results more realistic and to simulate you only ran this strategy on 30% of your holdings. A trading fee of 0.1% is also taken into account and is aligned to the base fee applied on Binance.
Oversold RSI with Tight Stop-Loss Strategy (by Coinrule)KRAKEN:LINKUSD
This is one of the best strategies that can be used to get familiar with technical indicators and start to include them in your rules on Coinrule .
ENTRY
1. This trading system uses the RSI (Relative Strength Index) to anticipate good points to enter positions. RSI is a technical indicator frequently used in trading. It works by measuring the speed and change of price movements to determine whether a coin is oversold (indicating a good entry point) or overbought (indicating a point of exit/entry for a short position). The RSI oscillates between 0 and 100 and is traditionally considered overbought when over 70 and oversold when below 30.
2. To pick the right moment to buy, the strategy enters a trade when the RSI falls below 30 indicating the coin is oversold and primed for a trend reversal.
EXIT
The strategy then exits the position when the price appreciates 7% from the point of entry. The position also maintains a tight stop-loss and closes the position if the price depreciates 1% from the entry price. The idea behind this is to cut your losing trades fast and let your winners ride.
The best time frame for this strategy based on our back testing data is the daily. Shorter time frames can also work well on certain coins, however in our experience, the daily works best. Feel free to experiment with this script and test it on a variety of your coins! With our back testing data a trading fee of 0.1% is taken into account. The fee is aligned to the base fee applied on Binance, which is the largest cryptocurrency exchange by volume. In the example shown, this strategy made a handsome net profit of 52.6% on Chainlink with 66.67% of trades being profitable.
You can execute this strategy on your favorite exchanges with Coinrule .
isamuch - 2MA Cross and Stop Lossสัญญาณซื้อ/ขาย : มาจาก Moving Average สองเส้นตัดกัน
Stop Loss : มาจากราคาต่ำสุด/สูงสุดของช่วงระหว่าง Moving Average สองเส้นตัดกันก่อนหน้ากับ Moving Average ตัดกันปัจจุบัน
Parabolic SAR Strategy With take profit and stop lossDo not make it too difficult!
This is my first strategy! I took the Parabolic SAR Strategy and added Stop Loss and Take profit, and I can see some fantastic results in 2h-3h-4h on some of the Crypto coins.
This is for training only, and I do not recommend using it as part of a trading bot, however, I do myself.
MultiPrice AlertThis is an alert script using Pinescript version 4. This enables one to set 5 alerts (1 StopLoss, 4 Targets), on 3 different symbols, at using a single alert in the UI.
Every visible line will only appear on the symbols that are selected. After setting targets when making an alert, select this indicator as a condition. Change the name to whatever you want, usually the names of the set of tickers.
The Alert message is dyanmic showing which Symbol with each type of alert, at whatever price.
Ability to disable the targets + symbols.
Alerts work by Stop Loss crossing under price and Targets Cross Over. Enabling the "Short" Targets reverses this.
The line that is being displayed is actually the price of the asset being moved over x number of bars. I have not found a way to plot a traditional horizontal line, as the code for it uses a fixed price.
As it being a user input, it is a variable. Any help with this would be appreicated.
Alerts are set to once per bar.
Known bug that sometimes if the prices that you set are inside the current candle stick, then your alert will immeaditally fire, either change the timeframe or let it fire and wait fo
After a target is hit, I reccomend setting the alert to 0 and REMAKING the alert. You MUST REMAKE THE ALERT AFTER ANY CHANGES. This script WILL NOT CHANGE ALERTS AS YOU CHANGE SETTINGS.
TradingView Alerts are not this smart , at least I haven't found a way to do this yet.
Anti-Volume Stop Loss multi timeframe [LM]Hello Traders,
I would like to introduce you fork of popular indicator Anti-Volume Stop Loss created by Buff Dormeier and cracked here on tradingview by @Rafka so shout out to him. I have tried to crack it myself as well as I'm big fan of Dormeier's work but it's not easy so really big thanks to Rafka
I have refactored original script and have included multi timeframe setting.
As its shown below you can select higher timeframe to track lower one:
Enjoy!
Bitlinc MARSI Study AST w/ Take Profit & Stop loss - beta 0.1This script is beta 0.1 - will update as soon as the script is tradable
This script is based on AST on a 10 minute timeframe. You can change the asset and the timeframe for any asset you want to trade, but for it to work correct ALL settings have to be testes in the Strategy section of the TradingView. Each assets and timeframe require a different mixture of settings. This is NOT a one settings fits all trading for all assets on any timeframe. Below are the settings and explanation on how it works.
How it fires a buy / sell:
The script will plot an RSI with upper and lower bands in a separate indicator window. The idea behind this script is to fire a LONG when MA crosses OVER lower band and fire a SHORT when the MA crosses under the lower band. Each order that fires is an OCO (Order Cancels Order) for pyramiding.
Settings:
You have full control of these settings as mentioned above, you must configure every part of this script for each asset and timeframe you trade.
- Length of MA
- Length
- Upper bands of RSI
- Lower bands of RSI
- Take profit percentage
- Stop loss percentage
- Month to start and end the strategy (within 2020)
- Day to start and end the strategy (within 2020)
- Quantity type
- Slippage
- Pyramiding
***Remember that after the signal to enter or exit a trade is fired, the alert will trigger AFTER the close of the candle that caused the tigger to fire
ATR Stop Loss LONG/SHORT by melihgulerYou can monitor the stop loss level according to ATR in 2 ways (Long/Short).
RSI + EMA+ MTF Stop-LossThis is a simple RSI with multiple MTF (No security) to help with direction short and long-term.
The rsi for the current chart has a noise reduction, while the rest are based on ma's.
I have supplied an extra flexible mtf rsi ma for potential adjustable/long-term stop-loss or direction identification.
Enjoy
RSI Stop LossExperiment for using RSI as a stop loss value, shows where the price will be when the RSI increases or decreases by a specified amount.
poki buy and sell Take profit and stop lossThis indicator is based on modelius model of lazy bear weis model with ATR for the buy=B sell =S
in addition there is Take profit and stop loss in % both for short and for long
next stage is to know the resistance level and support based on bollinger marked in blue and red dots
Also included Parabolic Sar (blue and red dots rising up or down)
The color of bulish or bearish zone is based on the cross of Hull avreage and linear regression ( for each time set may need different setting for accuracy )
So how to use this scrupt to better profit
1. if you have B signal and its on lower support level then its good starting place for buy. look at the Parabolic Sar if its in agreement. The exit can be either by S =sell, Take profit that you decide on % or by end of Parabolic SAR upward
2. exact the oposite for short
Play with setting for the desired results or change modify this script for your purpose
Pivot Stop LossHere we intend to use pivot points for stop loss and take profit. This has the added benefit of helping you to visualize support and resistance levels.
Hull modelius take profit and stop lossThis model has Hull moving average, fibs in form of Bollinger ,SMA and Modelius model with ATR for buy and sell power based on weis volume. Inside alerts for buy and sell. take profit and stop loss for both longs and shorts
so have fun
SL + TP Dynamics - By M.LolasStop Loss e Take Profit dinâmicos para operações semiautomatizadas.
By M.Lolas
STOP-LOSS-RSI with Edge-Preserving Filter Strategy V2Modified RSI strategy with entry and exit points.
I have allowed for High and Low risk for anyone interested in using it (NO GUARANTEES. DO YOUR OWN RESEARCH).
I will later consider incorporating the standard RSI for exit points. I am sure returns will increase based on current test runs :)
Returns look good based on the strategy result.
UT Bot final 15M XAUUSD High WinrateThis script is a 15-minute timeframe optimized swing trading strategy, designed for traders who prefer structured, rule-based entries and exits with a focus on trend quality and risk control.
The strategy is based on a modified UT Bot logic, enhanced with:
Sideways market filtering using ADX and ATR volatility conditions
Confirmed higher-quality entries by waiting for candle close on the signal timeframe
Retracement-based limit entries to improve average entry price
Multi-level partial take profits (TP1–TP5)
Configurable stop loss (fixed pips or percentage)
Automatic break-even after TP1
Full position close on opposite signal
The system is especially suitable for swing and semi-swing traders who want to:
Reduce trades during low-quality, ranging market conditions
Manage positions with partial exits and predefined risk
Use the strategy as a foundation for automation or alert-based trading bots
All key parameters (sensitivity, filters, take profits, stop loss, and entry behavior) are fully adjustable, allowing traders to adapt the strategy to different risk profiles and market conditions.
Super Regression Trend█ OVERVIEW
Super Regression Trend is an advanced trend-following indicator that combines classic linear regression with a SuperTrend mechanism based on RMSE (Root Mean Square Error). Instead of traditional ATR, it uses price deviations from the regression line, allowing for highly precise adaptation to current market volatility. The indicator is clean, dynamic, and equipped with optional risk management tools — automatic Take Profit and Stop Loss levels displayed after each trend reversal signal. Perfect for traders seeking solid trend confirmation with built-in position management support.
█ CONCEPT
The indicator was created to combine the advantages of linear regression (smooth trend tracking) with the reliability of the SuperTrend mechanism (trailing stop).
The key element is calculating RMSE based on deviations of the source price from the regression line over a specified period. The band around the regression (RMSE × multiplier) creates dynamic, trailing upper and lower levels. The trend changes only after price closes beyond this band — this allows the indicator to react quickly to new impulses while effectively filtering noise and false breakouts in consolidation.
█ FEATURES
Data source:
- Source price (default: close)
- Regression Length
Calculations:
- Linear regression line (ta.linreg)
- RMSE of deviations within the length window
- Upper and lower bands: regression ± (RMSE × Multiplier)
Trailing mechanism:
Levels are “pulled” in the direction opposite to the trend (minimized/maximized)
Trend change logic:
- Down → Up: close > upper band
- Up → Down: close < lower band
Visualization:
- SuperTrend line with breaks at reversal points
- Optional gradient fill between SuperTrend line and regression
- Optional bar coloring based on current trend
- “Buy” labels (green upward arrow) and “Sell” labels (red downward arrow) only on confirmed trend changes
Risk management:
- Optional automatic TP1/TP2/TP3 and SL levels after each signal
Two calculation modes:
- Candle Multiplier – multiplier of average candle body size (SMA(|open–close|))
- Percentage – percentage of the signal close price
Levels drawn as short horizontal lines
Persistent table in the top-right corner with current TP/SL values
Alerts:
- Buy Signal – triggers only on confirmed uptrend change
- Sell Signal – triggers only on confirmed downtrend change
█ HOW TO USE
Add to chart → paste the code in Pine Editor or search for “Super Regression Trend”.
Main settings:
- Regression Length → default 20 (regression window length)
- RMSE Multiplier → default 2 (key sensitivity parameter)
- Show SuperTrend Line / Fill to Regression / Color Bars → visual options
- Show TP/SL Levels → enable/disable risk management tools
- TP/SL Calculation Mode → “Candle Multiplier” or “Percentage”
- Multipliers/percentages for TP1–TP3 and SL → fully customizable
Interpretation:
- Green line and shading = uptrend
- Red line and shading = downtrend
- Higher RMSE Multiplier = fewer signals, higher quality
- Lower Multiplier = faster reaction, more signals (aggressive mode)
█ APPLICATIONS
Excellent for:
- Classic trend-following (enter with trend, exit on reversal)
- Momentum and breakout strategies
- Automated position management with optional TP/SL levels
Best combined with:
- Support/resistance levels, Pivot Points, psychological round numbers
- Confirmation from oscillators (RSI, Stochastic, MACD)
- Volume or volume profile analysis
Style adaptation:
- Scalping / daytrading → shorter regression length (10–20) and lower Multiplier (1.5–2.0)
- Swing / longer-term positions → longer regression (30–50) and higher Multiplier (2.0–3.0)
█ NOTES
- Works on all markets and timeframes
- Effectiveness depends on matching the RMSE Multiplier to the instrument’s volatility
- Higher Multiplier and Length values = fewer, but significantly more reliable signals






















